/*
1:下载  npm i vue-router
2:导入 (router/index.js)
   import {createRouter,createWebHashHistory} from 'vue-router'
3:实例化
  const router=createRouter({
    // 模式
    history:createWebHashHistory()
    //    配制
    routes:[{path:'..',component...}]
  })
4:暴露出去  export default router
5:在main.js挂载
  import router from './router'
  createApp(App).use(router).mount('#app')
6:路由出口

*/ 
import {createRouter,createWebHashHistory} from 'vue-router'
const router=createRouter({
     // history:路由模式
    history:createWebHashHistory(),
    // routes:路由配制
    routes:[
      {
        path:'/',
        component:()=>import('../views/home/index.vue')
      },
      {
        path:'/user',
        component:()=>import('../views/user/index.vue')
      },
    ]
})
export default router